#ifndef ANX_SPWM_H
#define ANX_SPWM_H

#include "Anx_config.h"


/* Public define ------------------------------------------------------------*/
#define spwm_start(Config) \
        Anx_TIM_DMABurst_MultiWriteStart(Config)

#define spwm_stop(Config) \
        Anx_TIM_DMABurst_MultiWriteStop(Config)

/* Public typedef ---------------------------------------------------------*/
typedef struct 
{
    TIM_HandleTypeDef* htim;
    uint32_t Channel;
    uint32_t BurstBaseAddress;
    uint32_t BurstRequestSrc;
    const uint32_t* BurstBuffer;
    uint32_t  BurstLength;
    uint32_t  DataLength;
} Anx_SPWM_ConfigTypeDef;

/* Public variables ---------------------------------------------------------*/
extern Anx_SPWM_ConfigTypeDef spwmConfig;

/* Public functions ---------------------------------------------------------*/
void Anx_TIM_DMABurst_MultiWriteStart(Anx_SPWM_ConfigTypeDef* Config);
void Anx_TIM_DMABurst_MultiWriteStop(Anx_SPWM_ConfigTypeDef* Config);

#endif
/*************************** End of file ****************************/
